<!--
*
* Copyright 2015 HISP Tanzania
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* @since 2015
* @author Joseph Chingalo profschingalo@gmail.com>
*
*
-->
<ion-header>
  <ion-navbar [color]="(colorSettings$ |async).colorAttributes.main">
    <ion-title>{{reportName}}</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <ion-grid>
    <ion-row>
      <ion-col text-center>
        <b>
          <span *ngIf="reportType" class="circled-btn-border circled-btn">
            <span *ngIf="reportType == 'dataSetReport'">DS</span>
            <span *ngIf="reportType == 'standardReport'">SD</span>
          </span>&nbsp;
          <span *ngIf="reportType">
            <span *ngIf="reportType == 'dataSetReport'" [translate]="'Data set report'"></span>
            <span *ngIf="reportType == 'standardReport'" [translate]="'Standard report'"></span>
          </span>
        </b>
      </ion-col>
    </ion-row>

    <ion-row>
      <ion-col>
        <div *ngIf="reportParams.paramOrganisationUnit" class="item-card" color="font-color" padding-top padding-bottom
          ion-button clear full text-center text-capitalize (tap)="openOrganisationUnitTree()">
          <img class="side-menu-icon" [src]="icons.orgUnit" />&nbsp;&nbsp; {{ selectedOrganisationUnitLabel|translate
          }}
        </div>
        <div *ngIf="reportParams.paramReportingPeriod" class="item-card" color="font-color" padding-top padding-bottom
          ion-button clear full text-center text-capitalize (tap)="openReportPeriodSelection()">
          <img class="side-menu-icon" [src]="icons.period" />&nbsp;&nbsp; {{ selectedPeriodLabel|translate }}
        </div>
        <div *ngIf="isAllReportParameterSet" class="item-card" padding-top padding-bottom full (tap)="goToView()">
          <div>
            <b>
              <span [translate]="'Report name'"></span>
            </b> : {{ reportName }}
            <br>
            <span *ngIf="reportParams.paramOrganisationUnit">
              <b>
                <span [translate]="'Organisation unit'"></span>
              </b> : {{ selectedOrganisationUnitLabel }}
              <br>
            </span>
            <span *ngIf="reportParams.paramReportingPeriod">
              <b>
                <span [translate]="'Period'"></span>
              </b> : {{ selectedPeriodLabel }}</span>
          </div>
          <div class="item-card" color="font-color" ion-button clear full text-center text-capitalize>
            <img class="side-menu-icon" [src]="icons.report" />&nbsp;&nbsp;
            <span [translate]="'Generate report'"></span>
          </div>
        </div>
      </ion-col>
    </ion-row>


  </ion-grid>

</ion-content>
